package com.macro.mall.tiny.modules.foster.mapper;

import com.macro.mall.tiny.modules.foster.model.User;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author zhuyi
 * @since 2024-03-26
 */
public interface UserMapper extends BaseMapper<User> {

    @Select("select * from user where username = #{username}")
    User selectUserByUsername(String username);

    @Select("select * from user where phone = #{phone} and id != #{userId}")
    User selectUserByPhoneAndNotMe(String phone,Long userId);
}
